package com.atguigu.gmall.realtime.app.demo;

import lombok.Data;

public class BeanTest {


    public static void main(String[] args) {
        Customer customer1 = new Customer();
        customer1.setId("101");
        customer1.setName("zhang3");

        Customer customer2 = new Customer();
        customer2.setId("101");
        customer2.setName("zhang3");

        if(customer1.equals(customer2)){
            System.out.println("相等");
        }else {
            System.out.println("不相等");
        }


    }



}

@Data
class Customer{
    String id;
    String name ;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


}